from .baseform import BaseForm
from wtforms import StringField,IntegerField
from wtforms.validators import InputRequired,Length

class PublicPostForm(BaseForm):
    title = StringField(validators=[Length(min=2,max=100,message='标题长度在2-100个字符之间')])
    content = StringField(validators=[Length(min=2,message='请输入正确长度的内容')])
    board_id = IntegerField(validators=[InputRequired(message='请选择板块')])


class PublicCommentForm(BaseForm):
    content = StringField(validators=[Length(min=2,max=200,message='请输入正确长度的评论内容')])
